.class Les/c90$k;
.super Lcom/estrongs/android/widget/c;
.source "FileShareServer.java"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;
.implements Landroid/content/DialogInterface$OnDismissListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Les/c90;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "k"
.end annotation


# instance fields
.field A:Les/o70$d;

.field B:Z

.field final synthetic C:Les/c90;


# direct methods
.method public constructor <init>(Les/c90;Landroid/app/Activity;Ljava/lang/String;Lcom/estrongs/fs/h;Les/o70$d;)V
    .locals 0

    .line 1
    iput-object p1, p0, Les/c90$k;->C:Les/c90;

    .line 2
    invoke-direct {p0, p2, p3, p4}, Lcom/estrongs/android/widget/c;-><init>(Landroid/content/Context;Ljava/lang/String;Lcom/estrongs/fs/h;)V

    const/4 p1, 0x0

    .line 3
    iput-boolean p1, p0, Les/c90$k;->B:Z

    .line 4
    iput-object p5, p0, Les/c90$k;->A:Les/o70$d;

    const/4 p1, 0x7

    .line 5
    invoke-virtual {p0, p1}, Lcom/estrongs/android/widget/c;->a(I)V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
    .locals 10

    .line 1
    iget-object p1, p0, Les/c90$k;->C:Les/c90;

    invoke-virtual {p0}, Lcom/estrongs/android/widget/c;->b()Ljava/lang/String;

    move-result-object p2

    invoke-static {p1, p2}, Les/c90;->a(Les/c90;Ljava/lang/String;)Ljava/lang/String;

    .line 2
    iget-object p1, p0, Les/c90$k;->C:Les/c90;

    invoke-static {p1}, Les/c90;->b(Les/c90;)Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Lcom/estrongs/android/util/h0;->t2(Ljava/lang/String;)Z

    move-result p1

    const-wide/16 v0, 0x0

    if-eqz p1, :cond_0

    .line 3
    :try_start_0
    iget-object p1, p0, Les/c90$k;->C:Les/c90;

    invoke-static {p1}, Les/c90;->b(Les/c90;)Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Lcom/estrongs/fs/impl/usb/e;->i(Ljava/lang/String;)[J

    move-result-object p1

    const/4 p2, 0x0

    aget-wide v0, p1, p2
    :try_end_0
    .catch Lcom/estrongs/fs/impl/usb/UsbFsException; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    :goto_0
    move-wide v6, v0

    goto :goto_2

    .line 4
    :cond_0
    :try_start_1
    new-instance p1, Landroid/os/StatFs;

    iget-object p2, p0, Les/c90$k;->C:Les/c90;

    invoke-static {p2}, Les/c90;->b(Les/c90;)Ljava/lang/String;

    move-result-object p2

    invoke-direct {p1, p2}, Landroid/os/StatFs;-><init>(Ljava/lang/String;)V

    .line 5
    invoke-virtual {p1}, Landroid/os/StatFs;->getBlockSize()I

    move-result p2
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    int-to-long v2, p2

    .line 6
    :try_start_2
    invoke-virtual {p1}, Landroid/os/StatFs;->getAvailableBlocks()I

    move-result p1
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_2

    int-to-long v0, p1

    goto :goto_1

    :catch_1
    move-wide v2, v0

    :catch_2
    :goto_1
    mul-long v0, v0, v2

    goto :goto_0

    .line 7
    :goto_2
    iget-object p1, p0, Les/c90$k;->A:Les/o70$d;

    iget-wide p1, p1, Les/o70$d;->e:J

    cmp-long v0, p1, v6

    if-lez v0, :cond_2

    .line 8
    invoke-static {}, Lcom/estrongs/android/pop/esclasses/ESActivity;->z()Landroid/app/Activity;

    move-result-object p1

    if-eqz p1, :cond_1

    .line 9
    new-instance p1, Lcom/estrongs/android/ui/dialog/z0;

    invoke-static {}, Lcom/estrongs/android/pop/esclasses/ESActivity;->z()Landroid/app/Activity;

    move-result-object v3

    iget-object p2, p0, Les/c90$k;->A:Les/o70$d;

    iget-wide v4, p2, Les/o70$d;->e:J

    .line 10
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object p2

    const v0, 0x7f11071e

    invoke-virtual {p2, v0}, Landroid/app/Application;->getString(I)Ljava/lang/String;

    move-result-object v9

    const-string v8, "Error!"

    move-object v2, p1

    invoke-direct/range {v2 .. v9}, Lcom/estrongs/android/ui/dialog/z0;-><init>(Landroid/content/Context;JJLjava/lang/String;Ljava/lang/String;)V

    .line 11
    invoke-virtual {p1}, Lcom/estrongs/android/ui/dialog/z0;->show()V

    .line 12
    :cond_1
    invoke-virtual {p0}, Lcom/estrongs/android/widget/c;->a()V

    return-void

    .line 13
    :cond_2
    iget-object p1, p0, Les/c90$k;->C:Les/c90;

    invoke-static {p1}, Les/c90;->b(Les/c90;)Ljava/lang/String;

    move-result-object p1

    const-string p2, "/"

    invoke-virtual {p1, p2}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result p1

    if-nez p1, :cond_3

    .line 14
    iget-object p1, p0, Les/c90$k;->A:Les/o70$d;

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v1, p0, Les/c90$k;->C:Les/c90;

    invoke-static {v1}, Les/c90;->b(Les/c90;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    iput-object p2, p1, Les/o70$d;->i:Ljava/lang/String;

    .line 15
    :cond_3
    invoke-static {}, Lcom/estrongs/android/pop/esclasses/ESActivity;->z()Landroid/app/Activity;

    move-result-object p1

    if-eqz p1, :cond_4

    .line 16
    invoke-static {}, Lcom/estrongs/android/pop/esclasses/ESActivity;->z()Landroid/app/Activity;

    move-result-object p1

    iget-object p2, p0, Les/c90$k;->A:Les/o70$d;

    const/4 v0, 0x1

    invoke-static {p1, p2, v0}, Les/o70;->a(Landroid/app/Activity;Ljava/lang/Object;Z)Les/o70;

    .line 17
    iput-boolean v0, p0, Les/c90$k;->B:Z

    .line 18
    :cond_4
    invoke-virtual {p0}, Lcom/estrongs/android/widget/c;->a()V

    return-void
.end method

.method public onDismiss(Landroid/content/DialogInterface;)V
    .locals 4

    .line 1
    iget-boolean p1, p0, Les/c90$k;->B:Z

    if-nez p1, :cond_0

    .line 2
    iget-object p1, p0, Les/c90$k;->C:Les/c90;

    iget-object v0, p0, Les/c90$k;->A:Les/o70$d;

    iget-object v0, v0, Les/o70$d;->j:Ljava/net/Socket;

    const/16 v1, 0x194

    const/4 v2, 0x1

    const-string v3, "Not found"

    invoke-static {p1, v0, v1, v3, v2}, Les/c90;->a(Les/c90;Ljava/net/Socket;ILjava/lang/String;Z)V

    goto :goto_0

    .line 3
    :cond_0
    iget-object p1, p0, Les/c90$k;->C:Les/c90;

    iget-object v0, p0, Les/c90$k;->A:Les/o70$d;

    iget-object v0, v0, Les/o70$d;->j:Ljava/net/Socket;

    const/16 v1, 0xc8

    const/4 v2, 0x0

    const-string v3, "OK"

    invoke-static {p1, v0, v1, v3, v2}, Les/c90;->a(Les/c90;Ljava/net/Socket;ILjava/lang/String;Z)V

    .line 4
    :goto_0
    invoke-super {p0}, Lcom/estrongs/android/widget/c;->a()V

    return-void
.end method
